------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files/stata_log_analysis.log
  log type:  text
 opened on:   7 May 2025, 20:53:01

. 
. ************************************************************
. 
. *******************     DATA ANALYSIS    *******************
. 
. ************************************************************
. 
. *****************************************************************
. 
. *******************     INTERESTING STATS     *******************
. 
. *****************************************************************
. 
. **# UN SECURITY COUNCIL P5 TOTAL IMPORTS
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/sipri_mod.dta"

. 
. keep if (ccode == 2 | ccode == 200 | ccode == 220 | ccode == 365 | ccode == 710)
(13,575 observations deleted)

. 
. rename TIV p5_TIV

. 
. collapse (sum) p5_TIV, by(year)

. 
. save "temps/sipri_p5.dta", replace
file temps/sipri_p5.dta saved

. 
. **# TOTAL GLOBAL IMPORTS
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/sipri_mod.dta"

. 
. collapse (sum) TIV, by(year)

. 
. save "temps/sipri_total.dta", replace
file temps/sipri_total.dta saved

. 
. **# TOTAL GLOBAL VS UNSC P5 PLOT
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/sipri_total.dta"

. 
. merge 1:1 year using temps/sipri_p5.dta

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                                75  (_merge==3)
    -----------------------------------------

. 
. graph twoway line TIV p5_TIV year, title("Total global MCW imports", span) subtitle("1950-2023", span) ytitle("Total global MCW imports 
> (TIV, millions)") ymtick(0(5000)50000) xtitle("Year") ylabel(0(10000)50000) xmtick(1950(5)2025) xlabel(1950(10)2025) legend(label(1 "All
>  Countries") label(2 "UNSC P5 Only") size(small))

. graph export totalglobal.png, replace
file /Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files/totalglobal.png saved as PNG format

. 
. //CALCULATING TOP IMPORTERS 1950-2024
. **# TOP 20 IMPORTERS
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/c6.dta"

. 
. collapse (sum) self_pampPLUSTIV, by(ccode)

. sort self_pampPLUSTIV

. keep in -20/L
(136 observations deleted)

. 
. ********************************************************
. 
. *******************     ANALYSIS     *******************
. 
. ********************************************************
. 
. **# "PAMP-PLUS" MCW SPEC
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/c6.dta"

. 
. xtset ccode year, yearly

Panel variable: ccode (unbalanced)
 Time variable: year, 1989 to 2018
         Delta: 1 year

. 
. *No interaction
. xtreg ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus i.lag_arms i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic, 
> fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0901                                         min =          1
     Between = 0.0192                                         avg =        7.7
     Overall = 0.0079                                         max =         29

                                                F(9, 57)          =       2.38
corr(u_i, Xb) = -0.7868                         Prob > F          =     0.0230

                                         (Std. err. adjusted for 58 clusters in ccode)
--------------------------------------------------------------------------------------
                     |               Robust
        ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------------+----------------------------------------------------------------
   ln_neigh_PAMPplus |  -.1042598   .0881584    -1.18   0.242     -.280794    .0722743
ln_conflict_PAMPplus |   .0870469   .0643681     1.35   0.182     -.041848    .2159419
          1.lag_arms |   .1053638    .327569     0.32   0.749    -.5505818    .7613094
          1.lastyear |   .8476101   .2497998     3.39   0.001     .3473947    1.347826
    year_of_conflict |  -.0209487   .0139574    -1.50   0.139     -.048898    .0070006
              polity |  -.0278538   .0263815    -1.06   0.296    -.0806819    .0249743
           lag_gdppc |  -.0078394   .3114249    -0.03   0.980     -.631457    .6157782
       ln_population |  -.8622368   .9061365    -0.95   0.345    -2.676744    .9522702
              ethnic |  -.2039776    .979837    -0.21   0.836    -2.166067    1.758112
               _cons |     20.647   14.41388     1.43   0.157    -8.216288    49.51029
---------------------+----------------------------------------------------------------
             sigma_u |   1.578352
             sigma_e |  1.1691851
                 rho |   .6456903   (fraction of variance due to u_i)
--------------------------------------------------------------------------------------

. est store ns3_plus

. gen analytical_sample_plus_ns = 1 if e(sample)
(3,944 missing values generated)

. xtreg ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus i.lag_arms i.lastyear year_of_conflict if analytical_sample_plus_ns == 1, fe v
> ce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0711                                         min =          1
     Between = 0.0455                                         avg =        7.7
     Overall = 0.0062                                         max =         29

                                                F(5, 57)          =       3.63
corr(u_i, Xb) = -0.2735                         Prob > F          =     0.0064

                                         (Std. err. adjusted for 58 clusters in ccode)
--------------------------------------------------------------------------------------
                     |               Robust
        ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------------+----------------------------------------------------------------
   ln_neigh_PAMPplus |  -.1561092   .1027681    -1.52   0.134    -.3618988    .0496804
ln_conflict_PAMPplus |   .0702117   .0637113     1.10   0.275    -.0573679    .1977913
          1.lag_arms |   .1264864   .3281542     0.39   0.701    -.5306311    .7836039
          1.lastyear |   .8169621   .2307553     3.54   0.001     .3548825    1.279042
    year_of_conflict |  -.0218367   .0151212    -1.44   0.154    -.0521164     .008443
               _cons |   6.080927   1.184624     5.13   0.000     3.708757    8.453096
---------------------+----------------------------------------------------------------
             sigma_u |  1.1605884
             sigma_e |  1.1751068
                 rho |  .49378437   (fraction of variance due to u_i)
--------------------------------------------------------------------------------------

. est store ns2_plus

. xtreg ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus if analytical_sample_plus_ns == 1, fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0142                                         min =          1
     Between = 0.0060                                         avg =        7.7
     Overall = 0.0103                                         max =         29

                                                F(2, 57)          =       1.73
corr(u_i, Xb) = -0.4259                         Prob > F          =     0.1862

                                         (Std. err. adjusted for 58 clusters in ccode)
--------------------------------------------------------------------------------------
                     |               Robust
        ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
---------------------+----------------------------------------------------------------
   ln_neigh_PAMPplus |  -.1895077   .1032296    -1.84   0.072    -.3962214    .0172061
ln_conflict_PAMPplus |    .032086   .0696179     0.46   0.647    -.1073214    .1714935
               _cons |   7.250672   1.220747     5.94   0.000     4.806169    9.695175
---------------------+----------------------------------------------------------------
             sigma_u |  1.2556777
             sigma_e |  1.2058488
                 rho |  .52023482   (fraction of variance due to u_i)
--------------------------------------------------------------------------------------

. est store ns1_plus

. 
. esttab ns1_plus ns2_plus ns3_plus using nsmodels_plus.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Country-fixed 
> effects linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using an extended version of Pamp
>  et al.'s (2018) specification of relevant types of MCW") mtitles("(1)" "(2)" "(3)") nonum nobaselevels eqlabel(none) align(c) label rep
> lace
(output written to nsmodels_plus.tex)

. 
. *Interaction
. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##lag_arms ln_conflict_PAMPplus i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic,
>  fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.1096                                         min =          1
     Between = 0.0232                                         avg =        7.7
     Overall = 0.0052                                         max =         29

                                                F(10, 57)         =       3.38
corr(u_i, Xb) = -0.7710                         Prob > F          =     0.0016

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |  -.0238952   .0942659    -0.25   0.801    -.2126593     .164869
                  1.lag_arms |   2.719271   1.095593     2.48   0.016     .5253834    4.913159
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2494691   .1016517    -2.45   0.017    -.4530232    -.045915
                             |
        ln_conflict_PAMPplus |   .0829934   .0643649     1.29   0.202    -.0458951    .2118819
                  1.lastyear |   .8096767   .2500494     3.24   0.002     .3089615    1.310392
            year_of_conflict |  -.0197896   .0133668    -1.48   0.144    -.0465561    .0069769
                      polity |  -.0295155   .0263111    -1.12   0.267    -.0822025    .0231715
                   lag_gdppc |   .0269133   .2981184     0.09   0.928    -.5700584     .623885
               ln_population |  -.8453353    .786816    -1.07   0.287    -2.420907    .7302365
                      ethnic |  -.5342169   .9656971    -0.55   0.582    -2.467992    1.399558
                       _cons |   19.41681   12.49354     1.55   0.126    -5.601062    44.43469
-----------------------------+----------------------------------------------------------------
                     sigma_u |   1.561709
                     sigma_e |  1.1581009
                         rho |  .64519825   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. est store s3_plus

. gen analytical_sample_plus_s = 1 if e(sample)
(3,944 missing values generated)

. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##lag_arms ln_conflict_PAMPplus i.lastyear year_of_conflict if analytical_sample_plus_s == 1, fe v
> ce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0910                                         min =          1
     Between = 0.0762                                         avg =        7.7
     Overall = 0.0168                                         max =         29

                                                F(6, 57)          =       4.87
corr(u_i, Xb) = -0.2726                         Prob > F          =     0.0004

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |  -.0763864   .0994051    -0.77   0.445    -.2754416    .1226688
                  1.lag_arms |    2.69964   1.179383     2.29   0.026     .3379667    5.061314
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2464723   .1074198    -2.29   0.025    -.4615768   -.0313678
                             |
        ln_conflict_PAMPplus |   .0661106   .0637603     1.04   0.304    -.0615671    .1937884
                  1.lastyear |   .7726466   .2357059     3.28   0.002     .3006536     1.24464
            year_of_conflict |  -.0206458   .0147193    -1.40   0.166    -.0501207    .0088291
                       _cons |   5.330289   1.109998     4.80   0.000     3.107557    7.553021
-----------------------------+----------------------------------------------------------------
                     sigma_u |  1.1414054
                     sigma_e |  1.1639988
                         rho |  .49020074   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. est store s2_plus

. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##lag_arms ln_conflict_PAMPplus if analytical_sample_plus_s == 1, fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0418                                         min =          1
     Between = 0.0079                                         avg =        7.7
     Overall = 0.0003                                         max =         29

                                                F(4, 57)          =       2.65
corr(u_i, Xb) = -0.3868                         Prob > F          =     0.0423

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |  -.0988475   .1024642    -0.96   0.339    -.3040285    .1063336
                  1.lag_arms |   3.072923   1.236262     2.49   0.016     .5973519    5.548495
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2815209   .1096414    -2.57   0.013    -.5010741   -.0619677
                             |
        ln_conflict_PAMPplus |   .0303018   .0694954     0.44   0.664    -.1088604     .169464
                       _cons |   6.291149   1.166635     5.39   0.000     3.955004    8.627295
-----------------------------+----------------------------------------------------------------
                     sigma_u |  1.2313538
                     sigma_e |   1.191947
                         rho |  .51625735   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. est store s1_plus

. 
. esttab s1_plus s2_plus s3_plus using smodels_plus.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Country-fixed effe
> cts linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using an extended version of Pamp et 
> al.'s (2018) specification of relevant types of MCW") mtitles("(4)" "(5)" "(6)") nonum nobaselevels eqlabel(none) align(c) label replace
(output written to smodels_plus.tex)

. 
. **# DESCRIPTIVE STATS
. 
. xtsum bd_best ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus arms_sanctioned lastyear year_of_conflict polity ln_GDP_pc ln_populati
> on ethnic if analytical_sample_plus_s == 1

Variable         |      Mean   Std. dev.       Min        Max |    Observations
-----------------+--------------------------------------------+----------------
bd_best  overall |  1043.207   5219.375         25      72013 |     N =     445
         between |             3610.519       27.5   27044.14 |     n =      58
         within  |             4012.219  -25965.94   46012.06 | T-bar = 7.67241
                 |                                            |
ln_BR_~s overall |  5.516415   1.503849   3.218876    11.1846 |     N =     445
         between |             1.182767   3.312696   8.844481 |     n =      58
         within  |              1.13093   1.471196   9.267403 | T-bar = 7.67241
                 |                                            |
ln_nei~s overall |  10.67809   1.754215    4.49981   13.14757 |     N =     445
         between |             1.906424   5.958361   13.14757 |     n =      58
         within  |             .7140512   7.609583   12.98075 | T-bar = 7.67241
                 |                                            |
ln_con~s overall |   9.01709   1.941732   3.332205   12.76277 |     N =     445
         between |             1.748013   4.755794   11.80806 |     n =      58
         within  |             1.061775   4.991158   11.64107 | T-bar = 7.67241
                 |                                            |
arms_s~d overall |  .4202247   .4941504          0          1 |     N =     445
         between |             .4281303          0          1 |     n =      58
         within  |             .3154073  -.4964419   1.282294 | T-bar = 7.67241
                 |                                            |
lastyear overall |   .811236   .3917615          0          1 |     N =     445
         between |             .3730634          0          1 |     n =      58
         within  |             .3072502  -.1530498   1.561236 | T-bar = 7.67241
                 |                                            |
year_o~t overall |  11.21348    12.2009          1         53 |     N =     445
         between |             7.549752          1   38.60714 |     n =      58
         within  |             7.516958  -26.39366     45.179 | T-bar = 7.67241
                 |                                            |
polity   overall |  1.393258   5.584764         -9         10 |     N =     445
         between |             4.683437  -8.571429         10 |     n =      58
         within  |             2.931347  -8.892456   12.77257 | T-bar = 7.67241
                 |                                            |
ln_GDP~c overall |  7.689531    1.22184   5.092965   10.53452 |     N =     444
         between |             1.181676   5.739965   10.40585 |     n =      58
         within  |             .2850633   6.660922   8.774654 | T-bar = 7.65517
                 |                                            |
ln_pop~n overall |  17.55774   1.328006   14.52985   21.02533 |     N =     445
         between |             1.371258   14.52985   21.00442 |     n =      58
         within  |             .1464101   17.10702   18.07498 | T-bar = 7.67241
                 |                                            |
ethnic   overall |  .2935636    .236862          0   .8686869 |     N =     445
         between |             .2293009          0   .8686869 |     n =      58
         within  |             .0877894  -.2872445   .7228565 | T-bar = 7.67241

. 
. **# MUNDLAK SPECIFICATION TEST
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/c6.dta"

. 
. xtset ccode year, yearly

Panel variable: ccode (unbalanced)
 Time variable: year, 1989 to 2018
         Delta: 1 year

. 
. *No interaction
. xtreg ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus i.lag_arms i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic, 
> vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0736                                         min =          1
     Between = 0.2243                                         avg =        7.7
     Overall = 0.0406                                         max =         29

                                                Wald chi2(9)      =      31.86
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0002

                                         (Std. err. adjusted for 58 clusters in ccode)
--------------------------------------------------------------------------------------
                     |               Robust
        ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
---------------------+----------------------------------------------------------------
   ln_neigh_PAMPplus |  -.0242516   .0618524    -0.39   0.695    -.1454801    .0969769
ln_conflict_PAMPplus |   .0855264   .0586645     1.46   0.145    -.0294539    .2005068
          1.lag_arms |   .1412635   .2686579     0.53   0.599    -.3852964    .6678234
          1.lastyear |   .9105857   .2119052     4.30   0.000     .4952593    1.325912
    year_of_conflict |  -.0161854   .0117608    -1.38   0.169    -.0392362    .0068653
              polity |  -.0357729   .0233489    -1.53   0.125     -.081536    .0099901
           lag_gdppc |  -.1240719   .1249297    -0.99   0.321    -.3689297    .1207859
       ln_population |  -.0520359   .1240297    -0.42   0.675    -.2951297    .1910579
              ethnic |   .4036975   .6077413     0.66   0.507    -.7874536    1.594849
               _cons |   6.020896   2.087708     2.88   0.004     1.929064    10.11273
---------------------+----------------------------------------------------------------
             sigma_u |  .75826256
             sigma_e |  1.1691851
                 rho |  .29607373   (fraction of variance due to u_i)
--------------------------------------------------------------------------------------

. estat mundlak

Mundlak specification test
H0: Covariates are uncorrelated with unobserved panel-level effects

    chi2(9) =  11.07
Prob > chi2 = 0.2710

Notes: Fixed effects and correlated random effects are
       consistent under H0 and Ha.
       Random effects are efficient under H0.

. 
. *Interaction
. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##lag_arms ln_conflict_PAMPplus i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic,
>  vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0894                                         min =          1
     Between = 0.2994                                         avg =        7.7
     Overall = 0.0727                                         max =         29

                                                Wald chi2(10)     =      51.62
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |   .0846352   .0721094     1.17   0.241    -.0566965     .225967
                  1.lag_arms |   2.852839   .9793623     2.91   0.004      .933324    4.772353
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2596742   .0915107    -2.84   0.005    -.4390318   -.0803166
                             |
        ln_conflict_PAMPplus |   .0835858   .0569945     1.47   0.142    -.0281213    .1952929
                  1.lastyear |   .8922992   .2109769     4.23   0.000      .478792    1.305806
            year_of_conflict |  -.0140814   .0109157    -1.29   0.197    -.0354757     .007313
                      polity |  -.0394167   .0233915    -1.69   0.092    -.0852631    .0064297
                   lag_gdppc |  -.1160922    .124628    -0.93   0.352    -.3603585    .1281741
               ln_population |   -.053146   .1153576    -0.46   0.645    -.2792428    .1729508
                      ethnic |   .2185185   .6411419     0.34   0.733    -1.038096    1.475134
                       _cons |   4.925486    1.90976     2.58   0.010     1.182424    8.668547
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .69550437
                     sigma_e |  1.1581009
                         rho |  .26506656   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. estat mundlak

Mundlak specification test
H0: Covariates are uncorrelated with unobserved panel-level effects

   chi2(10) =  21.67
Prob > chi2 = 0.0169

Notes: Fixed effects and correlated random effects are
       consistent under H0 and Ha.
       Random effects are efficient under H0.

. 
. 
. **# MARGINS
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/c6.dta"

. 
. xtset ccode year, yearly

Panel variable: ccode (unbalanced)
 Time variable: year, 1989 to 2018
         Delta: 1 year

. 
. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##lag_arms ln_conflict_PAMPplus i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic,
>  fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.1096                                         min =          1
     Between = 0.0232                                         avg =        7.7
     Overall = 0.0052                                         max =         29

                                                F(10, 57)         =       3.38
corr(u_i, Xb) = -0.7710                         Prob > F          =     0.0016

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |  -.0238952   .0942659    -0.25   0.801    -.2126593     .164869
                  1.lag_arms |   2.719271   1.095593     2.48   0.016     .5253834    4.913159
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2494691   .1016517    -2.45   0.017    -.4530232    -.045915
                             |
        ln_conflict_PAMPplus |   .0829934   .0643649     1.29   0.202    -.0458951    .2118819
                  1.lastyear |   .8096767   .2500494     3.24   0.002     .3089615    1.310392
            year_of_conflict |  -.0197896   .0133668    -1.48   0.144    -.0465561    .0069769
                      polity |  -.0295155   .0263111    -1.12   0.267    -.0822025    .0231715
                   lag_gdppc |   .0269133   .2981184     0.09   0.928    -.5700584     .623885
               ln_population |  -.8453353    .786816    -1.07   0.287    -2.420907    .7302365
                      ethnic |  -.5342169   .9656971    -0.55   0.582    -2.467992    1.399558
                       _cons |   19.41681   12.49354     1.55   0.126    -5.601062    44.43469
-----------------------------+----------------------------------------------------------------
                     sigma_u |   1.561709
                     sigma_e |  1.1581009
                         rho |  .64519825   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. 
. margins, at(ln_neigh_PAMPplus=(4(0.5)13) lag_arms=(0(1)1)) level(90)

Predictive margins                                         Number of obs = 445
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  ln_neigh_PAMPp~s =    4
        lag_arms         =    0
2._at:  ln_neigh_PAMPp~s =    4
        lag_arms         =    1
3._at:  ln_neigh_PAMPp~s =  4.5
        lag_arms         =    0
4._at:  ln_neigh_PAMPp~s =  4.5
        lag_arms         =    1
5._at:  ln_neigh_PAMPp~s =    5
        lag_arms         =    0
6._at:  ln_neigh_PAMPp~s =    5
        lag_arms         =    1
7._at:  ln_neigh_PAMPp~s =  5.5
        lag_arms         =    0
8._at:  ln_neigh_PAMPp~s =  5.5
        lag_arms         =    1
9._at:  ln_neigh_PAMPp~s =    6
        lag_arms         =    0
10._at: ln_neigh_PAMPp~s =    6
        lag_arms         =    1
11._at: ln_neigh_PAMPp~s =  6.5
        lag_arms         =    0
12._at: ln_neigh_PAMPp~s =  6.5
        lag_arms         =    1
13._at: ln_neigh_PAMPp~s =    7
        lag_arms         =    0
14._at: ln_neigh_PAMPp~s =    7
        lag_arms         =    1
15._at: ln_neigh_PAMPp~s =  7.5
        lag_arms         =    0
16._at: ln_neigh_PAMPp~s =  7.5
        lag_arms         =    1
17._at: ln_neigh_PAMPp~s =    8
        lag_arms         =    0
18._at: ln_neigh_PAMPp~s =    8
        lag_arms         =    1
19._at: ln_neigh_PAMPp~s =  8.5
        lag_arms         =    0
20._at: ln_neigh_PAMPp~s =  8.5
        lag_arms         =    1
21._at: ln_neigh_PAMPp~s =    9
        lag_arms         =    0
22._at: ln_neigh_PAMPp~s =    9
        lag_arms         =    1
23._at: ln_neigh_PAMPp~s =  9.5
        lag_arms         =    0
24._at: ln_neigh_PAMPp~s =  9.5
        lag_arms         =    1
25._at: ln_neigh_PAMPp~s =   10
        lag_arms         =    0
26._at: ln_neigh_PAMPp~s =   10
        lag_arms         =    1
27._at: ln_neigh_PAMPp~s = 10.5
        lag_arms         =    0
28._at: ln_neigh_PAMPp~s = 10.5
        lag_arms         =    1
29._at: ln_neigh_PAMPp~s =   11
        lag_arms         =    0
30._at: ln_neigh_PAMPp~s =   11
        lag_arms         =    1
31._at: ln_neigh_PAMPp~s = 11.5
        lag_arms         =    0
32._at: ln_neigh_PAMPp~s = 11.5
        lag_arms         =    1
33._at: ln_neigh_PAMPp~s =   12
        lag_arms         =    0
34._at: ln_neigh_PAMPp~s =   12
        lag_arms         =    1
35._at: ln_neigh_PAMPp~s = 12.5
        lag_arms         =    0
36._at: ln_neigh_PAMPp~s = 12.5
        lag_arms         =    1
37._at: ln_neigh_PAMPp~s =   13
        lag_arms         =    0
38._at: ln_neigh_PAMPp~s =   13
        lag_arms         =    1

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [90% conf. interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   5.670856   .6296154     9.01   0.000     4.635231    6.706481
          2  |   7.392251    .706798    10.46   0.000     6.229671     8.55483
          3  |   5.658908   .5832825     9.70   0.000     4.699494    6.618323
          4  |   7.255569   .6566535    11.05   0.000      6.17547    8.335667
          5  |   5.646961   .5370889    10.51   0.000     4.763528    6.530393
          6  |   7.118886   .6067545    11.73   0.000     6.120864    8.116909
          7  |   5.635013   .4910738    11.47   0.000     4.827269    6.442758
          8  |   6.982204   .5571669    12.53   0.000     6.065746    7.898662
          9  |   5.623066   .4452926    12.63   0.000     4.890625    6.355507
         10  |   6.845522   .5079819    13.48   0.000     6.009966    7.681078
         11  |   5.611118   .3998256    14.03   0.000     4.953463    6.268773
         12  |    6.70884   .4593289    14.61   0.000     5.953311    7.464369
         13  |    5.59917   .3547938    15.78   0.000     5.015587    6.182754
         14  |   6.572158   .4113967    15.98   0.000      5.89547    7.248845
         15  |   5.587223   .3103864    18.00   0.000     5.076683    6.097763
         16  |   6.435476   .3644698    17.66   0.000     5.835976    7.034975
         17  |   5.575275   .2669154    20.89   0.000     5.136239    6.014312
         18  |   6.298794   .3189922    19.75   0.000     5.774098    6.823489
         19  |   5.563328   .2249244    24.73   0.000      5.19336    5.933296
         20  |   6.162111   .2756819    22.35   0.000     5.708655    6.615568
         21  |    5.55138   .1854216    29.94   0.000     5.246389    5.856372
         22  |   6.025429   .2357368    25.56   0.000     5.637677    6.413182
         23  |   5.539433   .1503808    36.84   0.000     5.292078    5.786787
         24  |   5.888747   .2011713    29.27   0.000      5.55785    6.219644
         25  |   5.527485   .1236553    44.70   0.000      5.32409     5.73088
         26  |   5.752065    .175199    32.83   0.000     5.463888    6.040242
         27  |   5.515537   .1113998    49.51   0.000     5.332301    5.698774
         28  |   5.615383    .162007    34.66   0.000     5.348905    5.881861
         29  |    5.50359   .1182041    46.56   0.000     5.309161    5.698018
         30  |   5.478701   .1646956    33.27   0.000     5.207801    5.749601
         31  |   5.491642   .1413419    38.85   0.000     5.259156    5.724129
         32  |   5.342019   .1825644    29.26   0.000     5.041727     5.64231
         33  |   5.479695   .1744302    31.41   0.000     5.192783    5.766607
         34  |   5.205336   .2118057    24.58   0.000     4.856947    5.553726
         35  |   5.467747   .2128785    25.68   0.000     5.117593    5.817901
         36  |   5.068654   .2484357    20.40   0.000     4.660014    5.477295
         37  |     5.4558   .2542669    21.46   0.000     5.037568    5.874031
         38  |   4.931972   .2896648    17.03   0.000     4.455516    5.408428
------------------------------------------------------------------------------

. marginsplot, title("Predictive Margins for Model (6)") note("All other variabeles held at their means; 90% Confidence Intervals") ytitle
> ("Linear prediction of ln(Battle-Related Deaths)") xtitle("ln(Neighbour MCW Imports)")

Variables that uniquely identify margins: ln_neigh_PAMPplus lag_arms

. graph export marginsgraph.png, replace
file /Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files/marginsgraph.png saved as PNG format

. 
. margins, at(ln_neigh_PAMPplus=10.67809 lag_arms=(0(1)1)) level(90)

Predictive margins                                         Number of obs = 445
Model VCE: Robust

Expression: Linear prediction, predict()
1._at: ln_neigh_PAMPp~s = 10.67809
       lag_arms         =        0
2._at: ln_neigh_PAMPp~s = 10.67809
       lag_arms         =        1

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [90% conf. interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   5.511282   .1116107    49.38   0.000     5.327699    5.694865
          2  |   5.566699    .161085    34.56   0.000     5.301738    5.831661
------------------------------------------------------------------------------

. 
. ****************************************************************
. 
. *******************     ROBUSTNESS TESTS     *******************
. 
. ****************************************************************
. 
. **# SIPRI ALL MCW TYPES
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/c6.dta"

. 
. xtset ccode year, yearly

Panel variable: ccode (unbalanced)
 Time variable: year, 1989 to 2018
         Delta: 1 year

. 
. *No interaction
. xtreg ln_BR_deaths ln_neigh_MCW ln_conflict_MCW i.lag_arms i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic, fe vce(clu
> ster ccode)

Fixed-effects (within) regression               Number of obs     =        451
Group variable: ccode                           Number of groups  =         59

R-squared:                                      Obs per group:
     Within  = 0.0959                                         min =          1
     Between = 0.0047                                         avg =        7.6
     Overall = 0.0093                                         max =         29

                                                F(9, 58)          =       2.57
corr(u_i, Xb) = -0.9061                         Prob > F          =     0.0144

                                     (Std. err. adjusted for 59 clusters in ccode)
----------------------------------------------------------------------------------
                 |               Robust
    ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------+----------------------------------------------------------------
    ln_neigh_MCW |  -.1357206   .0879972    -1.54   0.128    -.3118661    .0404248
 ln_conflict_MCW |   .0480831   .0770093     0.62   0.535    -.1060678     .202234
      1.lag_arms |   .0724107   .3458225     0.21   0.835    -.6198281    .7646496
      1.lastyear |   .8018277   .2530633     3.17   0.002     .2952665    1.308389
year_of_conflict |  -.0125244   .0154515    -0.81   0.421    -.0434539    .0184052
          polity |  -.0295184   .0287712    -1.03   0.309    -.0871102    .0280733
       lag_gdppc |   .1567831     .33101     0.47   0.638    -.5058054    .8193716
   ln_population |  -1.402028   1.022379    -1.37   0.176    -3.448543     .644486
          ethnic |   .7446677   1.248917     0.60   0.553    -1.755312    3.244647
           _cons |   29.24878   16.31495     1.79   0.078    -3.409136    61.90669
-----------------+----------------------------------------------------------------
         sigma_u |  2.3280232
         sigma_e |  1.2228034
             rho |  .78376557   (fraction of variance due to u_i)
----------------------------------------------------------------------------------

. est store ns3_full

. gen analytical_sample_full_ns = 1 if e(sample)
(3,938 missing values generated)

. xtreg ln_BR_deaths ln_neigh_MCW ln_conflict_MCW i.lag_arms i.lastyear year_of_conflict if analytical_sample_full_ns == 1, fe vce(cluster
>  ccode)

Fixed-effects (within) regression               Number of obs     =        451
Group variable: ccode                           Number of groups  =         59

R-squared:                                      Obs per group:
     Within  = 0.0606                                         min =          1
     Between = 0.0418                                         avg =        7.6
     Overall = 0.0024                                         max =         29

                                                F(5, 58)          =       4.78
corr(u_i, Xb) = -0.3525                         Prob > F          =     0.0010

                                     (Std. err. adjusted for 59 clusters in ccode)
----------------------------------------------------------------------------------
                 |               Robust
    ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------+----------------------------------------------------------------
    ln_neigh_MCW |  -.2237427    .108857    -2.06   0.044    -.4416437   -.0058417
 ln_conflict_MCW |   .0136846   .0828059     0.17   0.869    -.1520695    .1794387
      1.lag_arms |    .086254   .3390369     0.25   0.800    -.5924021    .7649101
      1.lastyear |   .7857273   .2223269     3.53   0.001     .3406917    1.230763
year_of_conflict |   -.012179   .0164885    -0.74   0.463    -.0451843    .0208262
           _cons |   7.310966   1.549108     4.72   0.000     4.210089    10.41184
-----------------+----------------------------------------------------------------
         sigma_u |  1.1750757
         sigma_e |  1.2399534
             rho |   .4731552   (fraction of variance due to u_i)
----------------------------------------------------------------------------------

. est store ns2_full

. xtreg ln_BR_deaths ln_neigh_MCW ln_conflict_MCW if analytical_sample_full_ns == 1, fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        451
Group variable: ccode                           Number of groups  =         59

R-squared:                                      Obs per group:
     Within  = 0.0193                                         min =          1
     Between = 0.0020                                         avg =        7.6
     Overall = 0.0143                                         max =         29

                                                F(2, 58)          =       2.41
corr(u_i, Xb) = -0.5382                         Prob > F          =     0.0989

                                    (Std. err. adjusted for 59 clusters in ccode)
---------------------------------------------------------------------------------
                |               Robust
   ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
----------------+----------------------------------------------------------------
   ln_neigh_MCW |  -.2359539   .1075092    -2.19   0.032    -.4511569    -.020751
ln_conflict_MCW |  -.0244816   .0794182    -0.31   0.759    -.1834545    .1344913
          _cons |   8.333265   1.465604     5.69   0.000     5.399539    11.26699
----------------+----------------------------------------------------------------
        sigma_u |  1.2866855
        sigma_e |  1.2620683
            rho |  .50965762   (fraction of variance due to u_i)
---------------------------------------------------------------------------------

. est store ns1_full

. 
. esttab ns1_full ns2_full ns3_full using nsmodels_full.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Country-fixed 
> effects linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using all types of MCW recorded b
> y SIPRI (2025)") mtitles("(13)" "(14)" "(15)") nonum nobaselevels eqlabel(none) align(c) label replace
(output written to nsmodels_full.tex)

. 
. *Interaction
. xtreg ln_BR_deaths c.ln_neigh_MCW##lag_arms ln_conflict_MCW i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic, fe vce(cl
> uster ccode)

Fixed-effects (within) regression               Number of obs     =        451
Group variable: ccode                           Number of groups  =         59

R-squared:                                      Obs per group:
     Within  = 0.1086                                         min =          1
     Between = 0.0058                                         avg =        7.6
     Overall = 0.0081                                         max =         29

                                                F(10, 58)         =       3.53
corr(u_i, Xb) = -0.9060                         Prob > F          =     0.0011

                                            (Std. err. adjusted for 59 clusters in ccode)
-----------------------------------------------------------------------------------------
                        |               Robust
           ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
------------------------+----------------------------------------------------------------
           ln_neigh_MCW |  -.0535177   .0987708    -0.54   0.590    -.2512289    .1441934
             1.lag_arms |   2.352477    1.40012     1.68   0.098    -.4501669    5.155121
                        |
lag_arms#c.ln_neigh_MCW |
                     1  |  -.2125201   .1251725    -1.70   0.095    -.4630801    .0380399
                        |
        ln_conflict_MCW |   .0441786   .0758753     0.58   0.563    -.1077023    .1960595
             1.lastyear |   .7637327   .2504718     3.05   0.003      .262359    1.265107
       year_of_conflict |  -.0114336   .0148908    -0.77   0.446    -.0412408    .0183736
                 polity |  -.0326056   .0282015    -1.16   0.252     -.089057    .0238459
              lag_gdppc |   .1943635   .3167445     0.61   0.542    -.4396695    .8283964
          ln_population |  -1.432335    .948792    -1.51   0.137    -3.331548    .4668786
                 ethnic |   .5092484   1.304238     0.39   0.698    -2.101467    3.119964
                  _cons |   28.75206   15.35552     1.87   0.066    -1.985346    59.48947
------------------------+----------------------------------------------------------------
                sigma_u |  2.3576141
                sigma_e |  1.2157608
                    rho |   .7899394   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------------

. est store s3_full

. gen analytical_sample_full_s = 1 if e(sample)
(3,938 missing values generated)

. xtreg ln_BR_deaths c.ln_neigh_MCW##lag_arms ln_conflict_MCW i.lastyear year_of_conflict if analytical_sample_full_s == 1, fe vce(cluster
>  ccode)

Fixed-effects (within) regression               Number of obs     =        451
Group variable: ccode                           Number of groups  =         59

R-squared:                                      Obs per group:
     Within  = 0.0748                                         min =          1
     Between = 0.0672                                         avg =        7.6
     Overall = 0.0098                                         max =         29

                                                F(6, 58)          =       5.59
corr(u_i, Xb) = -0.3394                         Prob > F          =     0.0001

                                            (Std. err. adjusted for 59 clusters in ccode)
-----------------------------------------------------------------------------------------
                        |               Robust
           ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
------------------------+----------------------------------------------------------------
           ln_neigh_MCW |  -.1372436   .1171181    -1.17   0.246     -.371681    .0971937
             1.lag_arms |   2.450618   1.361295     1.80   0.077    -.2743095    5.175546
                        |
lag_arms#c.ln_neigh_MCW |
                     1  |   -.221075   .1178936    -1.88   0.066    -.4570647    .0149146
                        |
        ln_conflict_MCW |   .0089868   .0816204     0.11   0.913    -.1543942    .1723677
             1.lastyear |   .7405329   .2260068     3.28   0.002     .2881311    1.192935
       year_of_conflict |  -.0111968   .0161411    -0.69   0.491    -.0435066    .0211131
                  _cons |   6.468756   1.658936     3.90   0.000     3.148035    9.789477
------------------------+----------------------------------------------------------------
                sigma_u |  1.1573979
                sigma_e |   1.232123
                    rho |  .46875854   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------------

. est store s2_full

. xtreg ln_BR_deaths c.ln_neigh_MCW##lag_arms ln_conflict_MCW if analytical_sample_full_s == 1, fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        451
Group variable: ccode                           Number of groups  =         59

R-squared:                                      Obs per group:
     Within  = 0.0393                                         min =          1
     Between = 0.0061                                         avg =        7.6
     Overall = 0.0007                                         max =         29

                                                F(4, 58)          =       3.45
corr(u_i, Xb) = -0.4891                         Prob > F          =     0.0135

                                            (Std. err. adjusted for 59 clusters in ccode)
-----------------------------------------------------------------------------------------
                        |               Robust
           ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
------------------------+----------------------------------------------------------------
           ln_neigh_MCW |  -.1350508    .116069    -1.16   0.249    -.3673882    .0972867
             1.lag_arms |   2.838728   1.443654     1.97   0.054    -.0510592    5.728514
                        |
lag_arms#c.ln_neigh_MCW |
                     1  |  -.2555994   .1246541    -2.05   0.045    -.5051218   -.0060771
                        |
        ln_conflict_MCW |  -.0257133    .077379    -0.33   0.741    -.1806043    .1291776
                  _cons |   7.238959   1.609119     4.50   0.000     4.017958    10.45996
------------------------+----------------------------------------------------------------
                sigma_u |  1.2599498
                sigma_e |  1.2523346
                    rho |  .50303118   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------------

. est store s1_full

. 
. esttab s1_full s2_full s3_full using smodels_full.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Country-fixed effe
> cts linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using all types of MCW recorded by SI
> PRI (2025)") mtitles("(16)" "(17)" "(18)") nonum nobaselevels eqlabel(none) align(c) label replace
(output written to smodels_full.tex)

. 
. **# PAMP (2018) MCW SPEC
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/c6.dta"

. 
. xtset ccode year, yearly

Panel variable: ccode (unbalanced)
 Time variable: year, 1989 to 2018
         Delta: 1 year

. 
. *No interaction
. xtreg ln_BR_deaths ln_neigh_PAMP ln_conflict_PAMP i.lag_arms i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic, fe vce(c
> luster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0892                                         min =          1
     Between = 0.0191                                         avg =        7.7
     Overall = 0.0080                                         max =         29

                                                F(9, 57)          =       2.34
corr(u_i, Xb) = -0.7928                         Prob > F          =     0.0252

                                     (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------
                 |               Robust
    ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------+----------------------------------------------------------------
   ln_neigh_PAMP |  -.0893601   .0845767    -1.06   0.295     -.258722    .0800018
ln_conflict_PAMP |    .086865   .0641899     1.35   0.181    -.0416731    .2154031
      1.lag_arms |    .105211   .3296287     0.32   0.751     -.554859    .7652811
      1.lastyear |   .8511161   .2501843     3.40   0.001     .3501307    1.352102
year_of_conflict |  -.0211083   .0139962    -1.51   0.137    -.0491352    .0069187
          polity |  -.0280385   .0264449    -1.06   0.293    -.0809936    .0249166
       lag_gdppc |  -.0071951   .3115332    -0.02   0.982    -.6310296    .6166395
   ln_population |  -.8919753   .9030085    -0.99   0.327    -2.700219     .916268
          ethnic |   -.213531   .9802156    -0.22   0.828    -2.176379    1.749317
           _cons |   21.00294   14.40333     1.46   0.150    -7.839229    49.84512
-----------------+----------------------------------------------------------------
         sigma_u |  1.5991016
         sigma_e |  1.1697722
             rho |  .65141524   (fraction of variance due to u_i)
----------------------------------------------------------------------------------

. est store ns3_pamp

. gen analytical_sample_pamp_ns = 1 if e(sample)
(3,944 missing values generated)

. xtreg ln_BR_deaths ln_neigh_PAMP ln_conflict_PAMP i.lag_arms i.lastyear year_of_conflict if analytical_sample_pamp_ns == 1, fe vce(clust
> er ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0690                                         min =          1
     Between = 0.0566                                         avg =        7.7
     Overall = 0.0083                                         max =         29

                                                F(5, 57)          =       3.50
corr(u_i, Xb) = -0.2452                         Prob > F          =     0.0079

                                     (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------
                 |               Robust
    ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------+----------------------------------------------------------------
   ln_neigh_PAMP |  -.1357847   .0991236    -1.37   0.176    -.3342763     .062707
ln_conflict_PAMP |   .0695168   .0636646     1.09   0.279    -.0579694     .197003
      1.lag_arms |   .1268492   .3315864     0.38   0.703    -.5371411    .7908395
      1.lastyear |   .8217173   .2300958     3.57   0.001     .3609585    1.282476
year_of_conflict |  -.0221202   .0152334    -1.45   0.152    -.0526246    .0083841
           _cons |   5.860431   1.147995     5.10   0.000     3.561611    8.159251
-----------------+----------------------------------------------------------------
         sigma_u |  1.1501062
         sigma_e |  1.1764333
             rho |  .48868545   (fraction of variance due to u_i)
----------------------------------------------------------------------------------

. est store ns2_pamp

. xtreg ln_BR_deaths ln_neigh_PAMP ln_conflict_PAMP if analytical_sample_pamp_ns == 1, fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0112                                         min =          1
     Between = 0.0064                                         avg =        7.7
     Overall = 0.0103                                         max =         29

                                                F(2, 57)          =       1.48
corr(u_i, Xb) = -0.3938                         Prob > F          =     0.2353

                                     (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------
                 |               Robust
    ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-----------------+----------------------------------------------------------------
   ln_neigh_PAMP |   -.165829   .0978649    -1.69   0.096    -.3618002    .0301421
ln_conflict_PAMP |   .0308896   .0698479     0.44   0.660    -.1089784    .1707576
           _cons |   6.997738   1.172358     5.97   0.000     4.650132    9.345344
-----------------+----------------------------------------------------------------
         sigma_u |  1.2405674
         sigma_e |  1.2076998
             rho |  .51342242   (fraction of variance due to u_i)
----------------------------------------------------------------------------------

. est store ns1_pamp

. 
. esttab ns1_pamp ns2_pamp ns3_pamp using nsmodels_pamp.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Country-fixed 
> effects linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using Pamp et al.'s (2018) origin
> al specification of relevant types of MCW") mtitles("(7)" "(8)" "(9)") nonum nobaselevels eqlabel(none) align(c) label replace
(output written to nsmodels_pamp.tex)

. 
. *Interaction
. xtreg ln_BR_deaths c.ln_neigh_PAMP##i.lag_arms ln_conflict_PAMP i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic, fe vc
> e(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.1082                                         min =          1
     Between = 0.0228                                         avg =        7.7
     Overall = 0.0054                                         max =         29

                                                F(10, 57)         =       3.23
corr(u_i, Xb) = -0.7785                         Prob > F          =     0.0023

                                             (Std. err. adjusted for 58 clusters in ccode)
------------------------------------------------------------------------------------------
                         |               Robust
            ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------------------+----------------------------------------------------------------
           ln_neigh_PAMP |  -.0090638   .0895598    -0.10   0.920    -.1884041    .1702765
              1.lag_arms |   2.685036   1.089008     2.47   0.017      .504334    4.865737
                         |
lag_arms#c.ln_neigh_PAMP |
                      1  |  -.2474579   .1020389    -2.43   0.018    -.4517874   -.0431285
                         |
        ln_conflict_PAMP |   .0822915   .0641477     1.28   0.205    -.0461621     .210745
              1.lastyear |   .8134262   .2497283     3.26   0.002     .3133538    1.313499
        year_of_conflict |  -.0198551   .0133871    -1.48   0.144    -.0466623    .0069521
                  polity |  -.0301772   .0263243    -1.15   0.256    -.0828907    .0225364
               lag_gdppc |   .0319629   .2992542     0.11   0.915    -.5672834    .6312092
           ln_population |  -.8776883   .7879384    -1.11   0.270    -2.455508    .7001312
                  ethnic |  -.5263159   .9707688    -0.54   0.590    -2.470247    1.417615
                   _cons |   19.78942   12.55351     1.58   0.120    -5.348555    44.92739
-------------------------+----------------------------------------------------------------
                 sigma_u |  1.5840113
                 sigma_e |  1.1590105
                     rho |  .65130664   (fraction of variance due to u_i)
------------------------------------------------------------------------------------------

. est store s3_pamp

. gen analytical_sample_pamp_s = 1 if e(sample)
(3,944 missing values generated)

. xtreg ln_BR_deaths c.ln_neigh_PAMP##i.lag_arms ln_conflict_PAMP i.lastyear year_of_conflict if analytical_sample_pamp_s == 1, fe vce(clu
> ster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0884                                         min =          1
     Between = 0.0913                                         avg =        7.7
     Overall = 0.0204                                         max =         29

                                                F(6, 57)          =       4.57
corr(u_i, Xb) = -0.2385                         Prob > F          =     0.0008

                                             (Std. err. adjusted for 58 clusters in ccode)
------------------------------------------------------------------------------------------
                         |               Robust
            ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------------------+----------------------------------------------------------------
           ln_neigh_PAMP |  -.0563066   .0948405    -0.59   0.555    -.2462214    .1336083
              1.lag_arms |   2.667185   1.174061     2.27   0.027     .3161684    5.018201
                         |
lag_arms#c.ln_neigh_PAMP |
                      1  |  -.2445704   .1073134    -2.28   0.026    -.4594617    -.029679
                         |
        ln_conflict_PAMP |   .0648245   .0637143     1.02   0.313    -.0627612    .1924102
              1.lastyear |   .7773375   .2345654     3.31   0.002     .3076284    1.247047
        year_of_conflict |  -.0208376   .0148021    -1.41   0.165    -.0504782    .0088031
                   _cons |    5.12158   1.077249     4.75   0.000     2.964426    7.278734
-------------------------+----------------------------------------------------------------
                 sigma_u |  1.1282148
                 sigma_e |  1.1656622
                     rho |  .48367941   (fraction of variance due to u_i)
------------------------------------------------------------------------------------------

. est store s2_pamp

. xtreg ln_BR_deaths c.ln_neigh_PAMP##i.lag_arms ln_conflict_PAMP if analytical_sample_pamp_s == 1, fe vce(cluster ccode)

Fixed-effects (within) regression               Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0385                                         min =          1
     Between = 0.0106                                         avg =        7.7
     Overall = 0.0008                                         max =         29

                                                F(4, 57)          =       2.36
corr(u_i, Xb) = -0.3448                         Prob > F          =     0.0643

                                             (Std. err. adjusted for 58 clusters in ccode)
------------------------------------------------------------------------------------------
                         |               Robust
            ln_BR_deaths | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------------------+----------------------------------------------------------------
           ln_neigh_PAMP |  -.0752267   .0974316    -0.77   0.443      -.27033    .1198767
              1.lag_arms |   3.055602   1.243082     2.46   0.017     .5663738     5.54483
                         |
lag_arms#c.ln_neigh_PAMP |
                      1  |  -.2812492   .1105022    -2.55   0.014    -.5025261   -.0599724
                         |
        ln_conflict_PAMP |   .0285484   .0696074     0.41   0.683    -.1108379    .1679347
                   _cons |   6.049492   1.126847     5.37   0.000      3.79302    8.305964
-------------------------+----------------------------------------------------------------
                 sigma_u |  1.2134098
                 sigma_e |  1.1940115
                     rho |  .50805719   (fraction of variance due to u_i)
------------------------------------------------------------------------------------------

. est store s1_pamp

. 
. esttab s1_pamp s2_pamp s3_pamp using smodels_pamp.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Country-fixed effe
> cts linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using Pamp et al.'s (2018) original s
> pecification of relevant types of MCW") mtitles("(10)" "(11)" "(12)") nonum nobaselevels eqlabel(none) align(c) label replace
(output written to smodels_pamp.tex)

. 
. **# RANDOM EFFECTS W/ PAMP-PLUS
. 
. clear

. cd "/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files"
/Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files

. use "temps/c6.dta"

. 
. xtset ccode year, yearly

Panel variable: ccode (unbalanced)
 Time variable: year, 1989 to 2018
         Delta: 1 year

. 
. *No interaction
. xtreg ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus i.lag_arms i.lastyear year_of_conflict polity lag_gdppc ln_population ethnic, 
> re vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0736                                         min =          1
     Between = 0.2243                                         avg =        7.7
     Overall = 0.0406                                         max =         29

                                                Wald chi2(9)      =      31.86
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0002

                                         (Std. err. adjusted for 58 clusters in ccode)
--------------------------------------------------------------------------------------
                     |               Robust
        ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
---------------------+----------------------------------------------------------------
   ln_neigh_PAMPplus |  -.0242516   .0618524    -0.39   0.695    -.1454801    .0969769
ln_conflict_PAMPplus |   .0855264   .0586645     1.46   0.145    -.0294539    .2005068
          1.lag_arms |   .1412635   .2686579     0.53   0.599    -.3852964    .6678234
          1.lastyear |   .9105857   .2119052     4.30   0.000     .4952593    1.325912
    year_of_conflict |  -.0161854   .0117608    -1.38   0.169    -.0392362    .0068653
              polity |  -.0357729   .0233489    -1.53   0.125     -.081536    .0099901
           lag_gdppc |  -.1240719   .1249297    -0.99   0.321    -.3689297    .1207859
       ln_population |  -.0520359   .1240297    -0.42   0.675    -.2951297    .1910579
              ethnic |   .4036975   .6077413     0.66   0.507    -.7874536    1.594849
               _cons |   6.020896   2.087708     2.88   0.004     1.929064    10.11273
---------------------+----------------------------------------------------------------
             sigma_u |  .75826256
             sigma_e |  1.1691851
                 rho |  .29607373   (fraction of variance due to u_i)
--------------------------------------------------------------------------------------

. est store ns3_plus_re

. gen analytical_sample_plus_ns_re = 1 if e(sample)
(3,944 missing values generated)

. xtreg ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus i.lag_arms i.lastyear year_of_conflict if analytical_sample_plus_ns_re == 1, r
> e vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0603                                         min =          1
     Between = 0.1816                                         avg =        7.7
     Overall = 0.0446                                         max =         29

                                                Wald chi2(5)      =      22.81
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0004

                                         (Std. err. adjusted for 58 clusters in ccode)
--------------------------------------------------------------------------------------
                     |               Robust
        ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
---------------------+----------------------------------------------------------------
   ln_neigh_PAMPplus |  -.0266461    .064736    -0.41   0.681    -.1535262    .1002341
ln_conflict_PAMPplus |   .0511195   .0535973     0.95   0.340    -.0539292    .1561682
          1.lag_arms |   .2288811   .2601018     0.88   0.379    -.2809091    .7386713
          1.lastyear |   .9248217    .206592     4.48   0.000     .5199088    1.329735
    year_of_conflict |  -.0165989   .0125545    -1.32   0.186    -.0412052    .0080075
               _cons |   4.534762   .7292016     6.22   0.000     3.105553    5.963971
---------------------+----------------------------------------------------------------
             sigma_u |    .716733
             sigma_e |  1.1751068
                 rho |  .27114486   (fraction of variance due to u_i)
--------------------------------------------------------------------------------------

. est store ns2_plus_re

. xtreg ln_BR_deaths ln_neigh_PAMPplus ln_conflict_PAMPplus if analytical_sample_plus_ns_re == 1, re vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0108                                         min =          1
     Between = 0.0107                                         avg =        7.7
     Overall = 0.0008                                         max =         29

                                                Wald chi2(2)      =       0.67
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.7139

                                         (Std. err. adjusted for 58 clusters in ccode)
--------------------------------------------------------------------------------------
                     |               Robust
        ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
---------------------+----------------------------------------------------------------
   ln_neigh_PAMPplus |  -.0521432    .071645    -0.73   0.467    -.1925648    .0882783
ln_conflict_PAMPplus |    .029718   .0580563     0.51   0.609    -.0840703    .1435063
               _cons |    5.53715   .8045509     6.88   0.000     3.960259    7.114041
---------------------+----------------------------------------------------------------
             sigma_u |  .92843261
             sigma_e |  1.2058488
                 rho |  .37217849   (fraction of variance due to u_i)
--------------------------------------------------------------------------------------

. est store ns1_plus_re

. 
. esttab ns1_plus_re ns2_plus_re ns3_plus_re using nsmodels_plus_re.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Ra
> ndom-effects linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using an extended version of
>  Pamp et al.'s (2018) specification of relevant types of MCW") mtitles("(19)" "(20)" "(21)") nonum nobaselevels eqlabel(none) align(c) l
> abel replace
(output written to nsmodels_plus_re.tex)

. 
. *Interaction
. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##i.lag_arms ln_conflict_PAMPplus i.lastyear year_of_conflict polity lag_gdppc ln_population ethni
> c, re vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0894                                         min =          1
     Between = 0.2994                                         avg =        7.7
     Overall = 0.0727                                         max =         29

                                                Wald chi2(10)     =      51.62
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |   .0846352   .0721094     1.17   0.241    -.0566965     .225967
                  1.lag_arms |   2.852839   .9793623     2.91   0.004      .933324    4.772353
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2596742   .0915107    -2.84   0.005    -.4390318   -.0803166
                             |
        ln_conflict_PAMPplus |   .0835858   .0569945     1.47   0.142    -.0281213    .1952929
                  1.lastyear |   .8922992   .2109769     4.23   0.000      .478792    1.305806
            year_of_conflict |  -.0140814   .0109157    -1.29   0.197    -.0354757     .007313
                      polity |  -.0394167   .0233915    -1.69   0.092    -.0852631    .0064297
                   lag_gdppc |  -.1160922    .124628    -0.93   0.352    -.3603585    .1281741
               ln_population |   -.053146   .1153576    -0.46   0.645    -.2792428    .1729508
                      ethnic |   .2185185   .6411419     0.34   0.733    -1.038096    1.475134
                       _cons |   4.925486    1.90976     2.58   0.010     1.182424    8.668547
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .69550437
                     sigma_e |  1.1581009
                         rho |  .26506656   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. est store s3_plus_re

. gen analytical_sample_plus_s_re = 1 if e(sample)
(3,944 missing values generated)

. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##i.lag_arms ln_conflict_PAMPplus i.lastyear year_of_conflict if analytical_sample_plus_s_re == 1,
>  re vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0764                                         min =          1
     Between = 0.2735                                         avg =        7.7
     Overall = 0.0802                                         max =         29

                                                Wald chi2(6)      =      48.68
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |   .0833056   .0734931     1.13   0.257    -.0607382    .2273494
                  1.lag_arms |   2.909248   .9562487     3.04   0.002     1.035035    4.783461
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2566685   .0880238    -2.92   0.004     -.429192    -.084145
                             |
        ln_conflict_PAMPplus |   .0468797    .051507     0.91   0.363    -.0540721    .1478315
                  1.lastyear |   .9024766   .2087693     4.32   0.000     .4932963    1.311657
            year_of_conflict |  -.0146859   .0117482    -1.25   0.211     -.037712    .0083402
                       _cons |   3.439957   .7610589     4.52   0.000     1.948309    4.931605
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .65230222
                     sigma_e |  1.1639988
                         rho |  .23899136   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. est store s2_plus_re

. xtreg ln_BR_deaths c.ln_neigh_PAMPplus##i.lag_arms ln_conflict_PAMPplus if analytical_sample_plus_s_re == 1, re vce(cluster ccode)

Random-effects GLS regression                   Number of obs     =        445
Group variable: ccode                           Number of groups  =         58

R-squared:                                      Obs per group:
     Within  = 0.0305                                         min =          1
     Between = 0.0749                                         avg =        7.7
     Overall = 0.0247                                         max =         29

                                                Wald chi2(4)      =       9.69
corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0459

                                                 (Std. err. adjusted for 58 clusters in ccode)
----------------------------------------------------------------------------------------------
                             |               Robust
                ln_BR_deaths | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-----------------------------+----------------------------------------------------------------
           ln_neigh_PAMPplus |   .0623996   .0780081     0.80   0.424    -.0904934    .2152925
                  1.lag_arms |   3.125519   1.088299     2.87   0.004      .992491    5.258546
                             |
lag_arms#c.ln_neigh_PAMPplus |
                          1  |  -.2784429   .0976901    -2.85   0.004    -.4699119   -.0869738
                             |
        ln_conflict_PAMPplus |   .0300975   .0560872     0.54   0.592    -.0798314    .1400264
                       _cons |    4.26738   .8101838     5.27   0.000     2.679449    5.855311
-----------------------------+----------------------------------------------------------------
                     sigma_u |  .85236526
                     sigma_e |   1.191947
                         rho |  .33834987   (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------

. est store s1_plus_re

. 
. esttab s1_plus_re s2_plus_re s3_plus_re using smodels_plus_re.tex, booktabs se ar2(a2) b(a2) star(* 0.10 ** 0.05 *** 0.01) title("Random
> -effects linear regression models on ln(Battle-Related Deaths per year) with clustered standard errors, using an extended version of Pam
> p et al.'s (2018) specification of relevant types of MCW") mtitles("(22)" "(23)" "(24)") nonum nobaselevels eqlabel(none) align(c) label
>  replace
(output written to smodels_plus_re.tex)

. 
. log close
      name:  <unnamed>
       log:  /Users/alex/Documents/0University/0Modules/Year 4/PIED3769 Q Diss/Data/files/stata_log_analysis.log
  log type:  text
 closed on:   7 May 2025, 20:53:16
------------------------------------------------------------------------------------------------------------------------------------------
